<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>在线OJ - 题目列表</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        }

        html {
            font-size: 16px;
            background-color: #f8fafc;
        }

        body {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            line-height: 1.6;
        }

        /* 导航栏优化 */
        .navbar {
            background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
            height: 60px;
            padding: 0 2rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            position: relative;
            z-index: 50;
        }

        .navbar a {
            color: rgba(255, 255, 255, 0.9);
            text-decoration: none;
            padding: 0 1.5rem;
            height: 100%;
            display: inline-flex;
            align-items: center;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            font-weight: 500;
        }

        .navbar a:hover {
            background-color: rgba(255, 255, 255, 0.05);
            color: #25c2a0;
            transform: translateY(-1px);
        }

        .navbar .login {
            margin-left: auto;
            background: linear-gradient(135deg, #25c2a0 0%, #1a9d84 100%);
            border-radius: 8px;
            padding: 0 1.75rem;
            height: 40px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .navbar .login:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
        }

        .question_list {
            flex: 1;
            max-width: 1400px;
            width: 100%;
            margin: 3rem auto;
            padding: 0 2rem;
            animation: fadeIn 0.5s ease-out;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .question_list h1 {
            color: #1e293b;
            font-size: 2.5rem;
            margin-bottom: 2.5rem;
            padding-bottom: 1.25rem;
            border-bottom: 3px solid #e2e8f0;
            font-weight: 700;
            letter-spacing: -0.025em;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
            transition: transform 0.2s ease;
        }

        table:hover {
            transform: translateY(-2px);
        }

        th, td {
            padding: 1.25rem 2rem;
            text-align: left;
        }

        thead {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            border-bottom: 2px solid #e2e8f0;
        }

        th {
            color: #64748b;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.85rem;
            letter-spacing: 0.05em;
        }

        tbody tr {
            transition: all 0.2s ease;
            cursor: pointer;
        }

        tbody tr:not(:last-child) {
            border-bottom: 1px solid #f1f5f9;
        }

        tbody tr:hover {
            background-color: #f8fafc;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        }

        .item a {
            color: #1e293b !important;
            font-weight: 500;
            position: relative;
            padding-left: 1.5rem;
        }

        .item a::before {
            content: "•";
            color: #25c2a0;
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .item a:hover::before {
            opacity: 1;
        }

        .difficulty-easy { 
            color: #25c2a0;
            font-weight: 600;
            text-shadow: 0 2px 4px rgba(37, 194, 160, 0.1);
        }
        .difficulty-medium { 
            color: #f59e0b;
            font-weight: 600;
            text-shadow: 0 2px 4px rgba(245, 158, 11, 0.1);
        }
        .difficulty-hard { 
            color: #ef4444;
            font-weight: 600;
            text-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
        }

        /* 页脚优化 */
        .footer {
            background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
            color: rgba(255, 255, 255, 0.9);
            padding: 2rem;
            margin-top: 4rem;
            text-align: center;
            font-size: 0.9rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }

        /* 增强响应式设计 */
        @media (max-width: 1024px) {
            html {
                font-size: 15px;
            }
            
            .question_list {
                margin: 2rem auto;
                padding: 0 1.5rem;
            }
            
            th, td {
                padding: 1rem 1.5rem;
            }
        }

        @media (max-width: 768px) {
            .navbar {
                height: 56px;
                padding: 0 1rem;
            }
            
            .navbar a:not(.login) {
                display: none;
            }
            
            .navbar .login {
                margin-left: auto;
                padding: 0 1.25rem;
            }
            
            table {
                border-radius: 8px;
            }
            
            thead {
                display: none;
            }
            
            tbody tr {
                display: block;
                margin-bottom: 1rem;
                padding: 1.5rem;
                background: white;
                border-radius: 8px;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            }
            
            tbody td {
                display: block;
                text-align: right;
                padding: 0.75rem 1rem;
                border: none;
            }
            
            tbody td::before {
                content: attr(data-label);
                float: left;
                font-weight: 600;
                color: #64748b;
                text-transform: uppercase;
                font-size: 0.8rem;
            }
            
            .item a {
                padding-left: 0;
            }
            
            .item a::before {
                display: none;
            }
        }

        @media (max-width: 480px) {
            html {
                font-size: 14px;
            }
            
            .question_list h1 {
                font-size: 2rem;
            }
            
            .navbar .login {
                font-size: 0.9rem;
                padding: 0 1rem;
            }
        }
    </style>
</head>

<body>
    <nav class="navbar">
        <a href="/">首页</a>
        <a href="/all_questions">题库</a>
        <a href="#">竞赛</a>
        <a href="#">讨论</a>
    </nav>

    <main class="question_list">
        <h1 style="color: #636e72; text-align: center;">CodeQuest题目列表</h1>
        <table>
            <thead>
                <tr>
                    <th>编号</th>
                    <th>题目名称</th>
                    <th>难度</th>
                </tr>
            </thead>
            <tbody>
                {{#question_list}}
                <tr>
                    <td data-label="编号">{{number}}</td>
                    <td class="item" data-label="题目名称"><a href="/question/{{number}}"style="text-decoration: none; font-weight: bold;">{{title}}</a></td>
                    <td class="difficulty-{{difficulty}}" data-label="难度">{{star}}</td>
                </tr>
                {{/question_list}}
            </tbody>
        </table>
    </main>

    <footer class="footer">
        <p>© 2025 个人所有. All rights reserved.</p>
    </footer>
</body>
</html>